import logging
from prefect import task, flow, Flow

logger = logging.getLogger(__name__)

@task(log_prints=True)
def def_task():
    print('up_task')


@task
def task_name():
    logger.info('task')


@flow
def flow_name():
    logger.info('flow')
    for i in range(2):
        task_name()


if __name__ == '__main__':
    flow_name()
    # with Flow(name='flow_name') as flow:
    #     upstream_task = up_task()
    #     task = task_name(upstream_tasks=[upstream_task])
    #     flow.run()
